<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

//return [
//    '__pattern__' => [
//        'name' => '\w+',
//    ],
//    '[hello]'     => [
//        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//        ':name' => ['index/hello', ['method' => 'post']],
//    ],
//
//];
use think\Route;

//路由分组嵌套
Route::group(['method' => 'get'], function () {
    Route::group('api', function () {
        Route::any('text1', 'index/index');
        Route::any('text2', 'index/test1');

    });
});

//jwt(v1版本)
Route::group(['method' => 'get'], function(){
    Route::group(':version/api', function(){
        Route::any('jwt', '\app\api\:version\controller\JwtApi@getJwt');
        Route::any('Qlist', '\app\api\:version\controller\Qlist@test');
        Route::any('lz', '\app\api\:version\controller\Qlist@lz');

    });
});

//上传接口(v1版本)
Route::group(['method' => 'post'], function () {
    Route::group(':version/api', function () {
        Route::any('tx', '\app\api\:version\controller\Upload@tx');
        Route::any('al', '\app\api\:version\controller\Upload@al');
        Route::any('qn', '\app\api\:version\controller\Upload@qn');
        Route::any('upload', '\app\api\:version\controller\Upload@localUpload');
        Route::any('kdn', '\app\api\:version\controller\Express@Express');
    });
});